import java.util.Random;
import java.util.Scanner;

/**
 * Created by asus on 2017/5/21.
 */
public class LevelOne extends SetNum{

    int count=0;

    public String OpOne(){

        String result = getA() +" "+Operator[getC()]+" "+getA();
        return result;
    }

    public String OpTwo(){
        String result =getA()+" "+ Operator[getC()]+" "+getA()+" "+Operator[getC()]+" "+getA();
        return result;
    }
    public String choose(){
        Random in = new Random();
        int a = in.nextInt(2);
        if (a==1){
            return OpOne();
        }
        else
            return OpTwo();
    }
    public void project(){
        Scanner scan = new Scanner(System.in);
        LevelOne one = new LevelOne();
        Postfix b = new Postfix();
        System.out.println("How many do you need?");
        int num = scan.nextInt();
        for (int i =0;i<num;i++){
            String pro = one.choose();
            String pros = pro+"= ?";
            System.out.println(pros);
            int answer = scan.nextInt();

            if (answer==Integer.parseInt(b.Count(pro))){
                System.out.println("True");
                count++;
            }
            else
            {System.out.println("Wrong");
                System.out.println("The true is "+b.Count(pro));}
        }
    }


}
